<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta name="Description" content="The Organization for Transformative Works (OTW) is a nonprofit organization established by fans to serve the interests of fans"/>
    <meta name="Keywords" content="organization,transformative,works,otw,fan,fiction,fandom,archive,legal,journal,wiki"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>OTW >> Anti-Fanfic Bingo: <%=h controller.action_name.t %></title>
    <%= stylesheet_link_tag 'bingo-screen', :media => 'screen' %>
    <%= stylesheet_link_tag 'bingo-print', :media => 'print' %>
    <%= stylesheet_link_tag 'bingo-aural', :media => 'aural' %>
    <%= javascript_include_tag :defaults %>
    <%= javascript_include_tag 'click_to_globalize' %>
    <%= stylesheet_link_tag 'click_to_globalize', :media => 'all' %>
  </head>
  <body>
    <!-- START language menu -->
    <div id="click_to_globalize">
      <ul>
        <% if is_approved? %>
        <li>
          <!-- Shows check box if javascript enable, otherwise link -->
		  <span id="show-on-load" style="display:none;">
		  <script type="text/javascript">
		          // <![CDATA[
		          new Effect.Appear($('show-on-load'), {
		              duration: 0
		          });
		          // ]]>
      		  </script>
		  <!--highlight the new-entry if it exists-->
			<script type="text/javascript">
				window.onload = function(){
					if(document.getElementById('new-entry')) {
						new Effect.Highlight('new-entry', {duration: 5.0});
					}
				}
			</script>
		  <% form_for :user, :url => { :controller => 'users', :action => 'translating_toggle_check', :id => current_user.id  }  do |f| -%>
            <%= f.check_box(:is_translating, :checked => current_user.is_translating, :onclick => "this.form.submit()") -%>
            <label for="user[is_translating]"><%=h "Translate mode?".t -%></label>
          <% end %>
          </span>
          <noscript>
            <%= link_to h('Translation page'.t), :controller => "translation", :action => "index" -%>
          </noscript>
        </li>
        <% end %>
        <li>
          <%= languages_menu -%>
        </li>
      </ul>
    </div>
    <!-- END language menu -->
	
	<!-- START login display -->
	<%= render :partial => "users/login_display" %>
    <!-- END login display -->
	
	
	
	<!-- START header information for all application pages -->
    <div id="header">
      <div id="bingo-title">
        <h1><%=h "The Organization for Transformative Works".t %></h1>
        <h2><%=h "Anti-Fanfic Bingo!".t %></h2>
      </div>
      <div id="navigation">
        <ul>
          <% if is_approved? %>
          <li>
            <%= link_to_unless_current h('BINGO!'.t), { :controller => 'bingo', :action => "index" } %>
          </li>
          <li>
            <%= link_to_unless_current h('NEW ARGUMENT'.t), new_argument_path %>
          </li>
          <li>
            <%= link_to_unless_current h('SHOW ALL ARGUMENTS'.t), arguments_path %>
          </li>
          <% end %>
          <% if is_admin? %>
          <%= link_to_unless_current h('ADMIN'.t), users_path %>
          <% end %>
        </ul>
      </div>
    </div>
    <!-- END header information for all application pages -->
    <!-- START main page content -->
    <div class="bingo-container">
        <!-- START alerts, if any -->
        <% if flash[:error] %>
          <p class="error_alert">
            <%= flash[:error] %>
          </p>
        <% end %>
        <% if flash[:notice] %>
          <p class="info_alert">
            <%= flash[:notice] %>
          </p>
        <% end %>
        <!-- END alerts -->
      <%= yield %>
    </div>
    <!-- END main page content -->
    <!-- START shared footer -->
    <div class="footer">
      <p><%= "The server time is %s." / Time.now.localize("%d %B %Y") %></p>
      <% if controller.globalize? %>
      <script type="text/javascript" language="javascript" charset="utf-8">
        // <![CDATA[
        ClickToGlobalize.init('<%= form_authenticity_token %>');
        // ]]>
      </script>
      <% end %>
    </div>
    <!-- END shared footer -->
  </body>
</html>
